package com.haonan.springboot_exercise.controller;

import com.haonan.springboot_exercise.bean.pojo.MsgResult;
import com.haonan.springboot_exercise.bean.pojo.MyMailMessage;
import com.haonan.springboot_exercise.service.MailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author haonan
 * @date 2021/4/12 21:51
 **/
@RestController
public class TestNettyClientController {
    @Autowired
    MailService mailService;

    @RequestMapping("/nettyTest2")
    public MsgResult test2(@RequestBody MyMailMessage myMailMessage) throws Exception {
        return mailService.sendMyMail(myMailMessage);
    }

    @RequestMapping("/nettyTest3")
    public void test3(@RequestParam String s){
    }

}
